package com.example.demo.support.constant;

import java.util.regex.Pattern;

/**
 * 常量类..
 *
 * @author songbo.cai
 * @modify minghui.gan
 * @date 2012-08-16
 * @since 2.1.0
 */
public class ChannelConstant {


	/*定义状态常量*/
	public static final Integer SUCCESS = 0;
	public static final Integer FAILURE = 1;


	/** 统一的编码. */
	public static String ENCODE_GBK = "GBK";

	/** The ENCOD e_ ut f8. */
	public static String ENCODE_UTF8 = "UTF-8";

	/** The ENCOD e_ iso. */
	public static String ENCODE_ISO = "ISO-8859-1";

	/** 请求方式. */
	public static String METHOD_POST = "POST";

	/** 数据传输用的分隔符. */
	public static char CUTCHAR = (char) 1;

	/** 数据内容中换行替换符. */
	public static char CUTCHAR2 = (char) 2;

	/** The CUTCHA r_ str. */
	public static String CUTCHAR_STR = String.valueOf(CUTCHAR);

	/** The CUTCHA r2_ str. */
	public static String CUTCHAR2_STR = String.valueOf(CUTCHAR2);

	/** 换行符. */
	public static String NEWLINE = "\n";

	/** tab符. */
	public static String TABLE = "\t";

	/** 短信内容的换行替换正则. */
	public static Pattern NEWLINE_REGEX = Pattern.compile("\r\n|\n|\r");

	/** sp 短信中存在CUTCHAR2_STR的短信内容正则. */
	public static Pattern CUTCHAR2_REGEX = Pattern.compile(CUTCHAR2_STR);

	/** 优惠券报告文件追加分隔符. */
	public static String SIMPLE_SPILT = ",";

	/** 文件路径中的/符号. */
	public static String FILE_SEPARATOR = "/";

	/** 短信提醒类型 用于账户余额不足的短信发送. */
	public static enum AcountRemindType {
		/** The Normal account. */
		NormalAccount,
		/** The WAP account. */
		WAPAccount
	}

	// channel-client、channel-service、channel-process 共用

	/** 服务端处理Request对象的Service. */
	public static String SERVICE_ID = "serviceId";

	/** 数据压缩中的内容文件的文件名称. */
	public static String CONTENT_KEY = "content";

	/** 数据压缩中的内容文件的文件名称. */
	public static String TRANSIT = "transit";

	/** 数据压缩中的内容文件的后缀. */
	public static String ZIP_FILE_SUFFIX = ".zip";

	/** 放入Memcache缓存数据的时间，超过则抛异常(单位毫秒). */
	public static int SERVICE_SET_MEM = 2000;

	/** 取出Memcache缓存数据的时间，超过则抛异常(单位毫秒). */
	public static int SERVICE_GET_MEM = 2000;

	/** 日期格式. */
	public static String DATE_N_SYMBOL = "yyyyMMdd";

	/** The DAT e_ time. */
	public static String DATE_TIME = "yyyy-MM-dd HH:mm:ss";

	/** 数据库字段，是否合法 *. */
	public static String IS_VALID = "is_valid";

	/** 无效值 *. */
	public static String INVALID = "1";

	/** 有效值 *. */
	public static String VALID = "0";

	/** 数据库中字段长度，用于截取内容过大的内容. */
	public static final Integer VARCHAR_LENGTH = 255;

	/** string默认分割符, 用于XML定义 */
	public static final String DEFAULT_LIST_SEPARATOR_REGEX = "\\s*,\\s*";

	/** , 用于XML定义 */
	public static final String ZIP_STRUCT_FILTER = "zipStructFilter";
	/** , 用于XML定义 */
	public static final String DYNAMIC_FILTER = "dynamicFilter";

	public static String DES_KEY = "4e37e927e0fa4a859f1bb8141739059d";

	public final static String CHANNEL_TYPE_SMS = "SMS";//短信
	public final static String CHANNEL_TYPE_EDM = "EDM";//邮件
	public final static String CHANNEL_TYPE_COUPON = "COUPON";//优惠券
	public final static String CHANNEL_TYPE_UMP = "UMP";//定向优惠
	public final static String CHANNEL_TYPE_BENEFIT = "BENEFIT";//红包
	public static final String CHANNEL_TYPE_WEIXIN = "WEIXIN";//微信
    public static final String CHANNEL_TYPE_VSMS = "VSMS";//超级短信

	public final static String SEND_TYPE_SMS = "SMS";//短信
	public final static String SEND_TYPE_SMSDYNAMIC = "SMSDYNAMIC";//动态短信
	public final static String SEND_TYPE_EDM = "EDM";//邮件
	public final static String SEND_TYPE_EDMDYNAMIC = "EDMDYNAMIC";//动态邮件

	public final static int GATEWAY_HANDLE_ACK = 0;
	public final static int GATEWAY_HANDLE_CONTINUE = 1;
	public final static int GATEWAY_HANDLE_BREAK = 2;

	public final static String ZK_PATH_APP="/CHANNEL/ZK_PATH_APP/SP";
	public final static String ZK_PATH_GATEWAY="/CHANNEL/ZK_PATH_GATEWAY";
	public final static String ZK_PATH_JOB="/CHANNEL/ZK_PATH_JOB";

	public final static String syncObj = "syncObj";
	//内容审核限制发送
	public static final String SEND_LEVEL_LIMITED = "-1";
	//正常发送
	public static final String SEND_LEVEL_NORMAL = "0";
	//内容审核期过长直接测试发送陈宫
	public static final String SEND_LEVEL_TEST_AND_SUCCEED = "4";
	//忽略定时立即发送
	public static final String SEND_LEVEL_IMMEDIATELY = "5";
	//发送取消
	public static final String SEND_LEVEL_CANCELED = "9";
}
